/**

 @Name：layuiAdmin 设置
 @Author：贤心
 @Site：http://www.layui.com/admin/
 @License: LPPL
    
 */
 
layui.define(['form', 'upload'], function(exports){
  var $ = layui.$
  ,layer = layui.layer
  ,laytpl = layui.laytpl
  ,setter = layui.setter
  ,view = layui.view
  ,admin = layui.admin
  ,form = layui.form
  ,upload = layui.upload;

  var $body = $('body');
  
  form.render();
  //自定义验证
  form.verify({
    //确认密码
    repass: function(value){
      if(value !== $('#LAY_password').val()){
        return '两次密码输入不一致';
      }
    }
  });
  
  //网站设置
  form.on('submit(set_website)', function(obj){
    
    admin.req({
      url: ''
      ,data: obj.field
      ,success: function(){
        
        layer.msg(JSON.stringify(obj.field));
      }
    });
    return false;
  });
  

  

  
  
  //对外暴露的接口
  exports('set', {});
});